package com.saladin.personalFinancialSystem.controller;

import com.saladin.personalFinancialSystem.model.FinancialRecord;
import com.saladin.personalFinancialSystem.model.FinancialRecordMonthly;
import com.saladin.personalFinancialSystem.service.FinancialRecordMonthlyService;
import com.saladin.personalFinancialSystem.service.FinancialRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/FinancialRecordMonthly")
public class FinancialRecordMonthlyController {

    @Autowired
    private FinancialRecordMonthlyService financialRecordMonthlyService;
    /**
     * 获取商品的信息并且返回给客户端
     * @param userId
     * @return
     */
    @GetMapping("/QueryFinancialRecordMonthlyList")
    public List<FinancialRecordMonthly> QueryFinancialRecordMonthlyList(int userId) {
        List<FinancialRecordMonthly> financialRecordMonthlyList = financialRecordMonthlyService.queryFinancialRecordMonthlyList(userId);
        return financialRecordMonthlyList;
    }

}

